package com.bknow.model;

import java.io.Serializable;

import javax.validation.constraints.Pattern;




public class UserInfo implements Serializable{
	

	private static final long serialVersionUID = 1L;
	//用户id
	private Integer uId;
	//用户名
	@Pattern(regexp="^[a-zA-Z\\u4E00-\\u9FA5]{6,15}$",message="用户名必须是中文或字母不能是数字,6-15位")
	private String uName;
	//密码
	@Pattern(regexp="^[A-Z][a-zA-Z0-9_]{4,14}$",message="密码必须是英文大写开头,5-15位")
	private String uPwd;
	//手机号
	@Pattern(regexp="^1[34578]\\d{9}$",message="手机格式不正确,请输入11位手机号")
	private String uPhone;
	//邮箱
	@Pattern(regexp="^[a-zA-Z0-9_]{1,}@[0-9a-z]{1,}\\.(com|net|cn)$",message="邮箱格式不正确,eq:xxx@xx.com|cn|net")
	private String uEmail;
	//头像
	private String uHeadimg;
	public UserInfo() {
		
	}
	
	public UserInfo(Integer uId) {
		super();
		this.uId = uId;
	}

	public UserInfo(Integer uId, String uName, String uPwd, String uPhone, String uEmail,String uHeadimg) {
		this.uId = uId;
		this.uName = uName;
		this.uPwd = uPwd;
		this.uPhone = uPhone;
		this.uEmail = uEmail;
		this.setuHeadimg(uHeadimg);
	}
	public Integer getuId() {
		return uId;
	}
	public void setuId(Integer uId) {
		this.uId = uId;
	}
	public String getuName() {
		return uName;
	}
	public void setuName(String uName) {
		this.uName = uName;
	}
	public String getuPwd() {
		return uPwd;
	}
	public void setuPwd(String uPwd) {
		this.uPwd = uPwd;
	}
	public String getuPhone() {
		return uPhone;
	}
	public void setuPhone(String uPhone) {
		this.uPhone = uPhone;
	}
	public String getuEmail() {
		return uEmail;
	}
	public void setuEmail(String uEmail) {
		this.uEmail = uEmail;
	}
	public String getuHeadimg() {
		return uHeadimg;
	}
	public void setuHeadimg(String uHeadimg) {
		this.uHeadimg = uHeadimg;
	}
	@Override
	public String toString() {
		return "UserInfo [uId=" + uId + ", uName=" + uName + ", uPwd=" + uPwd + ", uPhone=" + uPhone + ", uEmail="
				+ uEmail + "]";
	}
	
	
	
	
	
	
}
